package gof.com.yew.proxy.dynamicproxy;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

import gof.com.yew.proxy.staticproxy.Movable;

public class ProxyHandler implements InvocationHandler{
	
	private Movable thing;
	
	public ProxyHandler(Movable thing) {
		this.thing = thing;
	}

	@Override
	public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
		method.invoke(thing, args);
		return null;
	}

}
